package com.myx.server;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.myx.server.domain.Server;
import com.myx.server.utils.DEMO;
import org.springframework.stereotype.Component;
import oshi.SystemInfo;
import oshi.software.os.OperatingSystem;
import oshi.software.os.unix.aix.AixOperatingSystem;
import oshi.util.Memoizer;

import javax.annotation.PostConstruct;
import java.util.function.Supplier;

@Component
public class ServerService {


    @PostConstruct
    public void serverPrint() throws Exception {
        Server server = new Server();
        server.copyTo();
        System.out.println(JSON.toJSONString(server, SerializerFeature.WriteMapNullValue, SerializerFeature.PrettyFormat, SerializerFeature.WriteDateUseDateFormat));

    }

}
